﻿using System.Collections;
using System.Collections.Generic;
using System.Text;
using UnityEngine;

public class CodeTextBase
{
    private static CodeTextBase _inst;
    public static CodeTextBase Inst
    {
        get {
            if (_inst == null)
                _inst = new CodeTextBase();
            return _inst;
        }
       
    }
    CodeTextLine _CodeTextLine;
    public CodeTextBase() {
        _CodeTextLine = new CodeTextLine();
    }
    public string Wrap(string fullText)
    {
        string[] lines = fullText.Split('\n');
        
        StringBuilder sb = new StringBuilder();
        foreach (var line in lines)
        {
            sb.Append(_CodeTextLine.Wrap(line)+"\n");
        }

        return sb.ToString();
    }
}
